home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 329 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  42 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news3.noc.netcom.net!zdc!zippo!usenet
  3. From: Jim McFarland <jgm6@orkand.em.cdc.gov>
  4. Subject: Re: Link Errors
  5. Content-Type: text/plain; charset=us-ascii
  6. Sender: usenet@news.zippo.com
  7. Content-Transfer-Encoding: 7bit
  8. Nntp-Posting-Host: 158.111.166.77
  9. Organization: The Orkand Corporation
  10. Message-ID: <DKMHu9.ALH@news.zippo.com>
  11. References: <4c515a$5lf@spectator.cris.com>
  12. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  13. Mime-Version: 1.0
  14. Date: Wed, 3 Jan 1996 20:49:21 GMT
  15.  
  16. mckebp@cris.com (Rasta Mon) wrote:
  17. >I keep getting errors involving Winmain in programs which don't even
  18. >involve Wimain.   I'm just trying to write a simple little program,
  19. >and I got this error:
  20. >Linker Error: Undefined symbol WINMAIN in module c0w.asm
  21. >It compiled just fine, what's the deal?
  22. >In case it helps, here's the source code, called Ted.cpp
  23. >#include <conio.h>
  24. >
  25. >int main()
  26. >    {
  27. >    clrscr();
  28. >    getch();
  29. >    return 0;
  30. >    }
  31. >I am, by the way, using Borland Turbo C++ for Windows.
  32.  
  33. You can't write simple little programs like this with Turbo C++ for 
  34. Windows. Your code would work in DOS, but not in Windows.  All Windows 
  35. programs must have a WinMain() function, unless you are using Borland's 
  36. OWL or another application framework, in which case there is still a 
  37. WinMain() but you don't supply it.  
  38.  
  39. Jim
  40.  
  41.  
  42.